import {
  GET_NEWSONGS_SUCCESS,
  INewSong,
  NewSongsUnionActionType,
} from "../actions/newsongs.action";

const initialState: INewSong[] = [];

export default function newSongsReducer(
  state = initialState,
  action: NewSongsUnionActionType
) {
  switch (action.type) {
    case GET_NEWSONGS_SUCCESS:
      return action.payload.result;
    default:
      return state;
  }
}
